package next.CommonProfile;

import junit.framework.Assert;
import next.CustomLayout.TitleBar;
import next.CustomLayout.TitleWidget;
import next.Functionality.S_3R4_Activity;
import next.TemplateActivity.R;
import next.control.ApplicationController;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;


public class Dashboard_Principal extends S_3R4_Activity {
	
	//--Attributes--
	private Button BTN_MSI,BTN_ASU,BTN_CSU, BTN_Search;

	/** Called when the activity is first created. */
	@Override
	 public void onCreate(Bundle savedInstanceState) {
	        super.onCreate(savedInstanceState);
	        setContentView(R.layout.app_dashboard_principal_layout);
	        
	        // -- Initialize title Bar--
			/*titleBar = (TitleBar) findViewById(R.id.normal_activity_CV_TB1);
			// -- Call the methods to change the underlying widgets--
			titleBar.setTitle("DASHBOARD");
			titleBar.setIcon(R.drawable.icon);
			titleBar.showProgressBar();*/

	        //--Initialize title Widget
	        TitleWidget titleWidget = (TitleWidget)findViewById(R.id.normal_activity_CV_TWI1);
	        //--Call the methods to change the underlying widgets
	        titleWidget.setTitle("DASHBOARD");
	        titleWidget.setIcon(R.drawable.icon);
	        titleWidget.showProgressBar();
	        titleWidget.hideProgressBar();
	        
	        //--Assembling XML widgets--
	        BTN_MSI = (Button) findViewById(R.id.dashboard_principalBTN04);
	        BTN_ASU = (Button) findViewById(R.id.dashboard_principalBTN01);
	        BTN_CSU = (Button) findViewById(R.id.dashboard_principalBTN02);
	        BTN_Search = (Button) findViewById(R.id.dashboard_principalBTN06);
	        EditText ete=(EditText) findViewById(R.id.dashboard_principalET1);
	         ete.setOnTouchListener(VoiceListener);
	       
	       	       
	        //--Adding actions to widgets
	        BTN_MSI.setOnClickListener(ApplicationController.getInstance());
	        BTN_ASU.setOnClickListener(ApplicationController.getInstance());
	        BTN_CSU.setOnClickListener(ApplicationController.getInstance());
	        BTN_Search.setOnClickListener(ApplicationController.getInstance());
	 }	
	
	
	@Override
	public void onActivityResult(int requestCode, int resultCode, Intent data) {
		if (requestCode == 1) {
			if (resultCode == RESULT_OK) {
				Toast.makeText(this, ("Yeah"), Toast.LENGTH_LONG).show();
			}
		}
	}

}
